The Week View component > FWeekView.setDataProvider() |
FWeekView.setDataProvider()
Availability
Flash Player 6.
Usage
myWeekView_wkv.setDataProvider (dataProvider)
Parameters
dataProvider The DataProvider the component will
use to populate its data.
Returns
Nothing
Description
Specifies the DataProvider the component will use to populate its data. The data provider should contain two fields, dateObj and data.
dateObj |
A Date object representing the date that the date is associated with. |
data |
The data associated with the date. |
Example
The week_example2.fla example file contains an example of using this method.
The following code uses a data provider to associate data with dates within the component.
var today = new Date();
var mom = new Date(54,6,27);
var dad = new Date(54,2,3);
var dp = new DataProviderClass();
dp.addItem({dateObj:today, data:"Today"});
dp.addItem({dateObj:mom, data:"Mom's Birthday"});
dp.addItem({dateObj:dad, data:"Dad's Birthday"});
myWeekView_wkv.setDataProvider( dp );
trace(myWeekView_wkv.getCellData(dad));
See also